#-*- encoding: gb2312 -*-  

import os
import sys 
reload(sys)   
sys.setdefaultencoding('gb2312')


def moveFiles(wp):
	fs = []
	for path, dirs, files in os.walk(wp):
		#print path
		#print dirs
		#print files
		if wp != path:
			fs.extend([path + '/' + os.listdir(path)[0]])
			
	for i in os.listdir(wp):
		if i.find('.doc') > 0:
			fs.extend([wp + i])
	
	return fs
	
if __name__ == "__main__":
	print moveFiles('C:/test/')